home *** CD-ROM | disk | FTP | other *** search
- //
- // Generic Air Movement unit AI file
- //
- // Behaviors:
- //
- // Handles takeoff and landing at airports
- //
- // Notes:
- //
- // Doesn't handle attacks - do those in specific AI files
- //
- // Known Problems:
- //
-
- // Takeoff
- Takeoff
- {
- AirportDestroyed true(Kill)
- MovePreparationComplete true(Taxi)
- }
-
- // Taxi
- Taxi
- {
- AirportDestroyed true(Kill)
- ArrivedAtMoveWaypoint true(ContinueToTaxi)
- }
-
- ContinueToTaxi
- {
- AirportDestroyed true(Kill)
- WaypointInAir true(Fly)
- WaypointOnGround true(Taxi)
- NextWaypointRetrieved false(BoardTransport)
- }
-
- // Fly
- Fly
- {
- FlightTimeAlarm true(RequestLanding)
- ArrivedAtMoveWaypoint true(ContinueToFly)
- }
-
- ContinueToFly
- {
- FlightTimeAlarm true(RequestLanding)
- NextWaypointRetrieved true(Fly) false(Circle)
- }
-
- // Circle
- Circle
- {
- FlightTimeAlarm true(RequestLanding)
- GoalIsExplore true(FindUnexploredArea)
- allof(LocationOffMap,LocationWayOffMap) true(MoveToValidMapLocation)
- }
-
- // RequestLanding
- RequestLanding
- {
- AirportDestroyed true(EmergencyTakeoff)
- AlwaysTrue true(HoldingPattern)
- }
-
- // HoldingPattern
- HoldingPattern
- {
- AirportDestroyed true(EmergencyTakeoff)
- HoldingPatternComputed true(WaitForLandingClearance)
- }
-
- // WaitForLandingClearance
- WaitForLandingClearance
- {
- AirportDestroyed true(EmergencyTakeoff)
- LandingClearanceGranted true(Land)
- ArrivedAtMoveWaypoint true(ContinueToWaitForLandingClearance)
- RequestStillValid false(RequestLanding)
- }
-
- // ContinueToWaitForLandingClearance
- ContinueToWaitForLandingClearance
- {
- NextWaypointRetrieved true(WaitForLandingClearance) false(CircleAirtrafficController)
- }
-
- // CircleAirtrafficController
- CircleAirtrafficController
- {
- AirportDestroyed true(EmergencyTakeoff)
- AlwaysTrue true(WaitForLandingClearance)
- }
-
- // Land
- Land
- {
- MovePreparationComplete true(Descend)
- }
-
- // Land
- RecalculateLanding
- {
- MovePreparationComplete true(Descend)
- }
-
- // Descend
- Descend
- {
- AirportDestroyed true(EmergencyTakeoff)
- ArrivedAtMoveWaypoint true(ContinueToDescend)
- }
- ContinueToDescend
- {
- AirportDestroyed true(EmergencyTakeoff)
- AirtrafficControllerMoved true(RecalculateLanding)
- WaypointIsSameElevation true(Brake)
- anyof(WaypointIsHigherElevation,WaypointIsLowerElevation) true(Descend)
- NextWaypointRetrieved false(BoardTransport)
- }
-
- // Brake
- Brake
- {
- AirportDestroyed true(Kill)
- ArrivedAtMoveWaypoint true(ContinueToBrake)
- }
- ContinueToBrake
- {
- AirportDestroyed true(Kill)
- NextWaypointRetrieved true(Brake) false(BoardTransport)
- }
-
- // Enter Airport
- BoardTransport
- {
- AirportDestroyed true(Kill)
- BoardedTransport true(Idle)
- }
-
- // Moving
- PrepareToMove
- {
- MovePreparationComplete true(Fly)
- }
-
- MoveToValidMapLocation
- {
- AlwaysTrue true(PrepareToMove)
- }
-
- FindUnexploredArea
- {
- SearchingForAreaToExplore true(FindUnexploredArea)
- NoUnexploredAreasLeft true(Circle) false(PrepareToMove)
- }
-
- // we've reached the end of the path
- ReacquireGoal
- {
- AlwaysTrue true(ShouldIReturnToInitialContactLocation)
- }
-
-